package com.springcloud.zull.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author wfh
 * <p>
 * 活动entity
 */
@Entity
@Table(name = "parent_activity")
@TableName("parent_activity")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Activity extends Model<Activity> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false, precision = 10, scale = 0)
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 活动时间 开始即结束
     */
    private Date activityTime;
    /**
     * 聚集点纬度
     */
    private Double lat;
    /**
     * 聚集点经度
     */
    private Double lng;
    /**
     * 聚集点详细名称
     */
    private String activityAddress;
    /**
     * 活动类型id
     */
    private Long activityTypeId;

    /**
     * 活动类型id
     */
    private Integer activityNumber;

    /**
     * 历史公告
     */
    private String historyAnnouncement;
    /**
     * 创建者id
     */
    private Long userId;
    /**
     * 删除标记 0 未删除 1删除
     */
    @ColumnDefault("false")
    private Boolean isDelete;
    /**
     * 创建时间
     */
    private Date createDate;
    /**
     * 修改时间
     */
    private Date updateDate;
}
